
# Try to find the header
FIND_PATH(SPATIALITE_INCLUDE_DIR spatialite.h )

# Find the library
FIND_LIBRARY(SPATILITE_LIBRARY
	NAMES spatialite
	DOC "The name of the spatialite library"
)

FIND_PATH (SQLITE_INCLUDE_DIR sqlite3.h )

FIND_LIBRARY(SQLITE_LIBRARY
	NAMES sqlite
	DOC "The name of the sqlite library"
)

SET(SPATIALITE_INCLUDE_DIRS ${SPATIALITE_INCLUDE_DIR} ${SQLITE_INCLUDE_DIR} )
SET(SPATIALITE_LIBRARIES ${SPATILITE_LIBRARY} ${SQLITE_LIBRARY} )

IF(SQLITE_INCLUDE_DIR AND SQLITE_LIBRARY)
	SET(SQLITE_FOUND TRUE)
ENDIF()

IF(SPATIALITE_INCLUDE_DIR AND SPATILITE_LIBRARY)
  SET(SPATIALITE_FOUND TRUE)
ENDIF()
